package com.lsh.oms.core.enums;

/**
 *
 * @author huangdong
 * @date 16/8/1
 */
public enum ShippingStatus {

	/**
	 *
	 */
	DELIVERING(1, "配送中"),
	DELIVERED(2, "已送达"),
	CANCEL(3, "已取消"),
	WAIT_DELIVER(4, "待配送");
//	GENERATE_SIGN(101, "已生成签收单"),
//	NOT_GENERATE_SIGN(102, "未生成有效签收单");

	private final int index;
	private final String name;

	ShippingStatus(int index, String name) {
		this.index = index;
		this.name = name;
	}

	public static String getName(int index) {
		for (ShippingStatus c : ShippingStatus.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	public int getIndex() {
		return index;
	}

	public String getName() {
		return name;
	}
}
